home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
m2
/
cat3src
/
cat
/
catopts.i
< prev
next >
Wrap
Text File
|
1997-10-26
|
87KB
|
2,136 lines
IMPLEMENTATION MODULE CatOpts;
(*==============================================================*
* Modul: CAT Optionenmodul, *
* Autor: Dirk Steins *
* erstellt am: 10.12.1993 *
* letzte nderung am: 10.12.1993 *
* Version: 0.1 *
* Interne Version: V#0001 *
*==============================================================*
*----------------------------------------------------------------------------
* Datum Vers. Autor nderung (Arbeitsbericht)
*----------------------------------------------------------------------------
* 10.12.93 0.1 DS Erste Implementation erstellt
* Optionsdialoge aus CAT.M hierhin verschoben
*----------------------------------------------------------------------------
*)
FROM SYSTEM IMPORT ADDRESS, ADR, TSIZE;
(* MM2-Module *)
IMPORT Strings;
IMPORT StrConv;
FROM Storage IMPORT ALLOCATE, DEALLOCATE;
(* Magic-Module *)
IMPORT MagicStrings, MagicAES;
IMPORT mtUtils, mtDials, mtAlerts, mtDir, mtPopups, mtAppl,
mtTextfiles;
(* CAT-Module *)
IMPORT CatTypes;
IMPORT CatGlobal;
IMPORT WdwManager;
IMPORT MausTauschrsc;
IMPORT MTE;
IMPORT CatEdit;
IMPORT grin;
IMPORT Printer;
IMPORT CatHelp;
IMPORT EditTypes;
IMPORT VDIUtil;
IMPORT ConfVars;
IMPORT Varnames;
IMPORT InfoDlg;
IMPORT UserInformation;
IMPORT MTPaths;
IMPORT MsgWindow;
IMPORT msgList;
IMPORT treeList;
IMPORT Protokoll;
IMPORT WinDials;
FROM Void IMPORT v;
(* Konstantendefinitionen *)
CONST CR = 15C;
LF = 12C;
wrongWildAlert = '[2][CAT:|Die Wildcardzeichen sind|nicht korrekt!|Bitte korrigieren Sie|Ihre Eingaben.][[OK]';
wrongWildReplace = '[3][CAT:|Die Zuordnung der Wildcards|ist nicht eindeutig!][[Abbruch]';
(* Typdefinitionen *)
TYPE Trick = POINTER TO RECORD
CASE : BOOLEAN OF
TRUE: wert: INTEGER;|
FALSE: hi: CHAR;
lo: CHAR;|
END;
END;
(* Globale Variablen *)
VAR
(* Such- und Ersetzeinstellungen *)
replaceOpts,
searchOpts : RECORD
isSet,
doIt,
ignoreCase,
askBack,
onlyWord: BOOLEAN;
theSearchWdw: INTEGER;
direction: EditTypes.searchDir;
count: EditTypes.searchCount;
pos: EditTypes.searchPos;
number: INTEGER;
searchStr,
replaceStr: CatTypes.String255;
END;
PROCEDURE InitDial (tree: ADDRESS) : BOOLEAN;
(* Ruft NewDial auf und zentriert ggf. den Dialog danach *)
BEGIN
IF ~mtDials.NewDial(tree) THEN
MTE.noMemAlert();
RETURN FALSE
END;
mtDials.DialCenter (tree, mtDials.CSCREEN, 0, 0, v.r);
RETURN TRUE;
END InitDial;
PROCEDURE GetItem(dial : ADDRESS; item : INTEGER):BOOLEAN;
BEGIN
RETURN mtUtils.InState(dial, item, MagicAES.SELECTED);
END GetItem;
PROCEDURE SetItem(dial : ADDRESS; item : INTEGER; b : BOOLEAN);
BEGIN
mtUtils.SetState (dial, item, MagicAES.SELECTED, b);
END SetItem;
PROCEDURE searchButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR allChar,
oneChar: CHAR;
BEGIN
mtUtils.ExclState(tree, button, MagicAES.SELECTED);
IF button = MausTauschrsc.srok
THEN
mtUtils.ObjcString (tree, MausTauschrsc.sqall, allChar);
mtUtils.ObjcString (tree, MausTauschrsc.sqone, oneChar);
IF (allChar = oneChar) OR (allChar = 0c) OR (oneChar = 0c)
THEN
MTE.info (wrongWildAlert);
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
RETURN FALSE
END;
(* String auslesen *)
WITH searchOpts DO
mtUtils.ObjcString (tree, MausTauschrsc.ssuchstr, searchStr);
(* Jetzt Suchstring berprfen, ob nur Wildcards drin sind *)
IF MagicStrings.Length (searchStr) = 0
THEN
(* Leerer String geht auch *)
RETURN TRUE
END;
(* Jetzt der eigentliche Test *)
WHILE ((searchStr [0] = allChar) OR (searchStr[0] = oneChar)) &
(MagicStrings.Length (searchStr) > 0) DO
MagicStrings.Delete (searchStr, 0, 1);
IF MagicStrings.Length (searchStr) = 0
THEN
MTE.info (MTE.noSearchStr);
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
END;
END;
IF MagicStrings.Length (searchStr) > 0 THEN RETURN TRUE; END;
END;
ELSIF button = MausTauschrsc.findhelp
THEN
CatHelp.DoHelp (CatHelp.textsearch);
ELSE
RETURN TRUE;
END;
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
RETURN FALSE;
END searchButton;
PROCEDURE searchGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR allChar,
oneChar: CHAR;
BEGIN
IF set
THEN
CatEdit.GetWildChars (oneChar, allChar);
mtUtils.SetObjcString (tree, MausTauschrsc.sqall, allChar);
mtUtils.SetObjcString (tree, MausTauschrsc.sqone, oneChar);
mtUtils.SetObjcString (tree, MausTauschrsc.ssuchstr, searchOpts.searchStr);
ELSE
exit := INTEGER(BITSET(exit) - {15});
mtUtils.ExclState(tree, exit, MagicAES.SELECTED);
IF exit = MausTauschrsc.srok
THEN
WITH searchOpts DO
isSet := TRUE;
(* Strings auslesen *)
ignoreCase := GetItem (tree, MausTauschrsc.scase);
onlyWord := GetItem (tree, MausTauschrsc.sword);
(* Startposition suchen *)
IF GetItem (tree, MausTauschrsc.sfromtop)
THEN pos := EditTypes.fromStart;
ELSIF GetItem (tree, MausTauschrsc.sfromcur)
THEN pos := EditTypes.fromPos;
END;
(* Anzahl feststellen *)
count := EditTypes.searchOne;
(* letzte Parameter *)
mtUtils.ObjcString (tree, MausTauschrsc.sqall, allChar);
mtUtils.ObjcString (tree, MausTauschrsc.sqone, oneChar);
IF (allChar = oneChar) OR (allChar = 0c) OR (oneChar = 0c)
THEN
MTE.info (wrongWildAlert);
ELSE
CatEdit.SetWildChars (oneChar, allChar);
END;
mtUtils.ObjcString (tree, MausTauschrsc.ssuchstr, searchStr);
IF CatEdit.IsEditTop (theSearchWdw)
THEN
doIt := TRUE;
(*
v.bool := CatEdit.Search (theSearchWdw, searchStr, pos, direction, count, 1,
ignoreCase, onlyWord, FALSE);
*)
END;
END;
END;
END;
END searchGetSetValues;
PROCEDURE DoSearch();
VAR ersetzBox: mtUtils.tObjcTree;
BEGIN
ersetzBox := MausTauschrsc.TreeAddr^[MausTauschrsc.findbox];
IF CatEdit.IsEditTop (WdwManager.ownTopWindow)
THEN
searchOpts.theSearchWdw := WdwManager.ownTopWindow;
searchOpts.doIt := FALSE;
IF ~WinDials.OpenWinDial (ersetzBox, TRUE,
searchGetSetValues,
searchGetSetValues,
searchButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
RETURN
END;
WinDials.WinDialHandleEvents();
WITH searchOpts DO
IF doIt
THEN
WdwManager.HandlePendingEvents ();
v.bool := CatEdit.Search (theSearchWdw, searchStr, pos, direction, count, 1,
ignoreCase, onlyWord, FALSE);
END;
END;
END;
END DoSearch;
PROCEDURE DoSearchAgain (kstate: BITSET);
VAR sDir: EditTypes.searchDir;
BEGIN
IF CatEdit.IsEditTop (WdwManager.ownTopWindow)
THEN
WITH searchOpts DO
pos := EditTypes.fromPos;
IF CatGlobal.WithShift (kstate)
THEN
IF direction = EditTypes.forward
THEN
sDir := EditTypes.backward
ELSE
sDir := EditTypes.forward
END;
ELSE
sDir := direction;
END;
v.bool := CatEdit.Search (WdwManager.ownTopWindow, searchStr, pos, sDir, count, 1,
ignoreCase, onlyWord, TRUE);
END;
END;
END DoSearchAgain;
PROCEDURE replaceButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR allChar,
oneChar: CHAR;
BEGIN
button := INTEGER(BITSET(button) - {15});
CASE button OF
MausTauschrsc.rgesamt,
MausTauschrsc.reinmal :
mtUtils.SetState (tree, MausTauschrsc.rcount, MagicAES.DISABLED, TRUE);
mtUtils.SetFlag (tree, MausTauschrsc.rcount, MagicAES.EDITABLE, FALSE);
mtDials.DialDraw (tree, MausTauschrsc.rcount, 0, v.r, FALSE);
RETURN FALSE; |
MausTauschrsc.rnmal:
mtUtils.SetState (tree, MausTauschrsc.rcount, MagicAES.DISABLED, FALSE);
mtUtils.SetFlag (tree, MausTauschrsc.rcount, MagicAES.EDITABLE, TRUE);
mtDials.DialDraw (tree, MausTauschrsc.rcount, 0, v.r, FALSE);
RETURN FALSE; |
MausTauschrsc.rrok,
MausTauschrsc.rrquit:
mtUtils.ExclState(tree, button, MagicAES.SELECTED);
IF button = MausTauschrsc.rrok
THEN
mtUtils.ObjcString (tree, MausTauschrsc.rrqall, allChar);
mtUtils.ObjcString (tree, MausTauschrsc.rrqone, oneChar);
IF (allChar = oneChar) OR (allChar = 0c) OR (oneChar = 0c)
THEN
MTE.info (wrongWildAlert);
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
RETURN FALSE
END;
(* String auslesen *)
mtUtils.ObjcString (tree, MausTauschrsc.rsuchstr, replaceOpts.searchStr);
(* Jetzt Suchstring berprfen, ob nur Wildcards drin sind *)
IF MagicStrings.Length (replaceOpts.searchStr) = 0
THEN
(* Leerer String geht auch *)
RETURN TRUE
END;
(* Jetzt der eigentliche Test *)
WHILE ((replaceOpts.searchStr [0] = allChar) OR (replaceOpts.searchStr[0] = oneChar)) &
(MagicStrings.Length (replaceOpts.searchStr) > 0) DO
MagicStrings.Delete (replaceOpts.searchStr, 0, 1);
IF MagicStrings.Length (replaceOpts.searchStr) = 0
THEN
MTE.info (MTE.noSearchStr);
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
END;
END;
IF MagicStrings.Length (replaceOpts.searchStr) > 0 THEN RETURN TRUE; END;
ELSE
RETURN TRUE;
END;
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE); |
MausTauschrsc.replhelp:
mtUtils.ExclState(tree, button, MagicAES.SELECTED);
CatHelp.DoHelp (CatHelp.textrepl);
WinDials.WinDialDraw (tree, button, 8, v.r, FALSE);
ELSE
END;
RETURN FALSE;
END replaceButton;
PROCEDURE replaceGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR allChar,
oneChar: CHAR;
numStr: ARRAY [0..7] OF CHAR;
text: EditTypes.textPtr;
len: LONGCARD;
BEGIN
IF set
THEN
WITH replaceOpts DO
IF CatEdit.BlockIsMarked (replaceOpts.theSearchWdw)
THEN
IF CatEdit.GetBlock (replaceOpts.theSearchWdw, FALSE, FALSE, text, len) & (text # NIL)
THEN
Strings.Copy (text^, 0, 39, searchStr, v.bool);
DEALLOCATE (text, 0);
END;
END;
CatEdit.GetWildChars (oneChar, allChar);
mtUtils.SetObjcString (tree, MausTauschrsc.rrqall, allChar);
mtUtils.SetObjcString (tree, MausTauschrsc.rrqone, oneChar);
mtUtils.SetObjcString (tree, MausTauschrsc.rsuchstr, searchStr);
mtUtils.SetObjcString (tree, MausTauschrsc.rreplstr, replaceStr);
IF GetItem (tree, MausTauschrsc.rnmal)
THEN
mtUtils.SetState (tree, MausTauschrsc.rcount, MagicAES.DISABLED, FALSE);
mtUtils.SetFlag (tree, MausTauschrsc.rcount, MagicAES.EDITABLE, TRUE);
ELSE
mtUtils.SetState (tree, MausTauschrsc.rcount, MagicAES.DISABLED, TRUE);
mtUtils.SetFlag (tree, MausTauschrsc.rcount, MagicAES.EDITABLE, FALSE);
END;
END;
ELSE
exit := INTEGER(BITSET(exit) - {15});
mtUtils.ExclState(tree, exit, MagicAES.SELECTED);
IF exit = MausTauschrsc.rrok
THEN
WITH replaceOpts DO
isSet := TRUE;
(* Strings auslesen *)
ignoreCase := GetItem (tree, MausTauschrsc.rcase);
onlyWord := GetItem (tree, MausTauschrsc.rword);
(* Startposition suchen *)
IF GetItem (tree, MausTauschrsc.rfromtop)
THEN pos := EditTypes.fromStart;
ELSIF GetItem (tree, MausTauschrsc.rfromcur)
THEN pos := EditTypes.fromPos;
END;
(* Suchrichtung feststellen *)
direction := EditTypes.forward;
(* Anzahl feststellen *)
IF GetItem (tree, MausTauschrsc.reinmal)
THEN count := EditTypes.searchOne;
ELSIF GetItem (tree, MausTauschrsc.rgesamt)
THEN count := EditTypes.searchAll
ELSE
count := EditTypes.searchNum;
mtUtils.ObjcString (tree, MausTauschrsc.rcount, numStr);
v.card := 0;
number := StrConv.StrToInt (numStr, v.card, v.bool);
END;
(* letzte Parameter *)
askBack := GetItem (tree, MausTauschrsc.raskback);
(* Jetzt noch feststellen, ob Suchen oder Ersetzen *)
mtUtils.ObjcString (tree, MausTauschrsc.rsuchstr, searchStr);
mtUtils.ObjcString (tree, MausTauschrsc.rreplstr, replaceStr);
mtUtils.ObjcString (tree, MausTauschrsc.rrqall, allChar);
mtUtils.ObjcString (tree, MausTauschrsc.rrqone, oneChar);
IF (allChar = oneChar) OR (allChar = 0c) OR (oneChar = 0c)
THEN
MTE.info (wrongWildAlert);
ELSE
CatEdit.SetWildChars (oneChar, allChar);
END;
IF CatEdit.CheckWildAssign (searchStr, replaceStr)
THEN
doIt := TRUE;
(*
v.bool := CatEdit.SearchAndReplace (replaceOpts.theSearchWdw, searchStr, replaceStr, pos, direction,
count, number, ignoreCase, onlyWord,
askBack, FALSE);
*)
ELSE
MTE.info (wrongWildReplace);
END;
END;
END;
END;
END replaceGetSetValues;
PROCEDURE DoReplace (win: INTEGER);
VAR form: mtUtils.tObjcTree;
BEGIN
form := MausTauschrsc.TreeAddr^[MausTauschrsc.ersetzen];
IF CatEdit.IsEditTop (win)
THEN
replaceOpts.theSearchWdw := win;
replaceOpts.doIt := FALSE;
IF ~WinDials.OpenWinDial (form, TRUE,
replaceGetSetValues,
replaceGetSetValues,
replaceButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
RETURN
END;
WinDials.WinDialHandleEvents();
WITH replaceOpts DO
IF doIt
THEN
WdwManager.HandlePendingEvents ();
v.bool := CatEdit.SearchAndReplace (theSearchWdw, searchStr, replaceStr, pos, direction,
count, number, ignoreCase, onlyWord,
askBack, FALSE);
END;
END;
END;
END DoReplace;
PROCEDURE tauschButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR res : INTEGER;
BEGIN
res := INTEGER(BITSET(button) - {15});
mtUtils.ExclState(tree, res, MagicAES.SELECTED);
IF res = MausTauschrsc.tchelp
THEN
CatHelp.DoHelp (CatHelp.tauschconf);
ELSE
VDIUtil.GetIntStr (tree, MausTauschrsc.osplitsiz, v.int);
IF (res = MausTauschrsc.conf2ok) & (v.int < 1024)
THEN
MTE.info ('[1][CAT:|Eine Splitgre von weniger|als 1 KB ist nicht sinnvoll!][[Nochmal]');
ELSE
RETURN TRUE;
END;
END;
WinDials.WinDialDraw (tree, res, 1, v.r, FALSE);
RETURN FALSE;
END tauschButton;
PROCEDURE tauschGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR str : ARRAY [0..9] OF CHAR;
val : BOOLEAN;
BEGIN
IF set
THEN
WITH UserInformation.UserBLK DO
SetItem(tree, MausTauschrsc.iebox, MakeAfterDecode);
SetItem(tree, MausTauschrsc.iendebox, MakeAtEnd);
SetItem(tree, MausTauschrsc.odbox, DeleteAfterDecode);
SetItem(tree, MausTauschrsc.osbox, DecodeAtStart);
SetItem(tree, MausTauschrsc.otbox, DecodeAfterRun);
SetItem(tree, MausTauschrsc.opbox, StartTermAtStart);
SetItem(tree, MausTauschrsc.termover, TermAsOverlay);
SetItem(tree, MausTauschrsc.vsbox, MakeBeforeTerminal);
ConfVars.GetConfDefBool (cShowLog, val, FALSE);
SetItem(tree, MausTauschrsc.oautolog, val);
SetItem(tree, MausTauschrsc.oautospl, autoSplit);
SetItem(tree, MausTauschrsc.oabsatz, endlessLines);
SetItem(tree, MausTauschrsc.omessdat, messDateToIn);
VDIUtil.SetLongIntStr (tree, MausTauschrsc.osplitsiz, splitSize);
END;
ELSE
IF exit = MausTauschrsc.conf2ok
THEN
WITH UserInformation.UserBLK DO
MakeAfterDecode := GetItem(tree, MausTauschrsc.iebox);
MakeAtEnd := GetItem(tree, MausTauschrsc.iendebox);
DeleteAfterDecode := GetItem(tree, MausTauschrsc.odbox);
DecodeAtStart := GetItem(tree, MausTauschrsc.osbox);
DecodeAfterRun := GetItem(tree, MausTauschrsc.otbox);
StartTermAtStart := GetItem(tree, MausTauschrsc.opbox);
TermAsOverlay := GetItem(tree, MausTauschrsc.termover);
MakeBeforeTerminal:= GetItem(tree, MausTauschrsc.vsbox);
autoSplit := GetItem(tree, MausTauschrsc.oautospl);
endlessLines := GetItem(tree, MausTauschrsc.oabsatz);
messDateToIn := GetItem(tree, MausTauschrsc.omessdat);
val := GetItem(tree, MausTauschrsc.oautolog);
v.bool := ConfVars.SetConfigBool (cShowLog, val);
v.bool := ConfVars.SetConfigBool (cAutoSplit, autoSplit);
v.bool := ConfVars.SetConfigBool (cAbsatz, endlessLines);
v.bool := ConfVars.SetConfigBool (cMakeAfterDec, MakeAfterDecode);
v.bool := ConfVars.SetConfigBool (cMakeAtEnd, MakeAtEnd);
v.bool := ConfVars.SetConfigBool (cDelAfterDecode, DeleteAfterDecode);
v.bool := ConfVars.SetConfigBool (cDecAtStart, DecodeAtStart);
v.bool := ConfVars.SetConfigBool (cDecAfterRun, DecodeAfterRun);
v.bool := ConfVars.SetConfigBool (cTermAtStart, StartTermAtStart);
v.bool := ConfVars.SetConfigBool (cTermOverlay, TermAsOverlay);
v.bool := ConfVars.SetConfigBool (cMakeBeforeTerm, MakeBeforeTerminal);
v.bool := ConfVars.SetConfigBool (cMessDate, messDateToIn);
VDIUtil.GetLongIntStr (tree, MausTauschrsc.osplitsiz, splitSize);
v.bool := ConfVars.SetConfigLongInt (cSplitSize, splitSize);
END;
END;
END;
END tauschGetSetValues;
PROCEDURE DoTausch();
VAR res : INTEGER;
val : BOOLEAN;
str : ARRAY [0..9] OF CHAR;
form: mtUtils.tObjcTree;
BEGIN
form := MausTauschrsc.TreeAddr^[MausTauschrsc.tausch_cnf];
IF ~WinDials.OpenWinDial (form, FALSE,
tauschGetSetValues,
tauschGetSetValues,
tauschButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
END;
END DoTausch;
PROCEDURE CheckInfoline(REF infoline : ARRAY OF CHAR):BOOLEAN; (* Testet UserBLK.infoline *)
CONST okSet = CatTypes.charSet{'A', 'F', 'U', 'D', 'T', 'G', 'H', 'M', 'S', 'V', 'N', 'R', 'I', ':', ',', ';', '.', '-',
'<', '>', '!', '?', ' ', '#', '|'};
formatSet = CatTypes.charSet{'A','D','T','H'};
(* Neu: S fr Sex (Anrede)
* V fr Vorname
* N fr Nachname
* F fr FuzzyDate
*)
VAR z, l : CARDINAL;
inStr : BOOLEAN;
inBrackets: BOOLEAN;
BEGIN
l := MagicStrings.Length(infoline);
inStr := FALSE;
inBrackets := FALSE;
IF l = 0 THEN RETURN FALSE END;
FOR z := 0 TO l-1 DO
IF inStr THEN
IF (infoline[z] = '"') OR (infoline[z] = "'") THEN
inStr := ~inStr
END;
ELSIF inBrackets
THEN
IF (infoline[z] = ')') THEN
inBrackets := FALSE
END;
ELSE
IF ~(MagicStrings.Cap(infoline[z]) IN okSet) THEN
IF (infoline[z] = '"') OR (infoline[z] = "'") THEN
inStr := ~inStr
ELSIF (infoline[z] = '(') & ((z>0) & (infoline[z-1] IN formatSet))
THEN
inBrackets := TRUE;
ELSE
RETURN FALSE
END;
END;
END;
END;
RETURN ~inStr
END CheckInfoline;
PROCEDURE optionButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR res : INTEGER;
BEGIN
res := INTEGER(BITSET(button) - {15});
mtUtils.ExclState (tree, res, MagicAES.SELECTED);
IF res = MausTauschrsc.ophelp
THEN
CatHelp.DoHelp (CatHelp.allgconf);
ELSE
RETURN TRUE;
END;
WinDials.WinDialDraw (tree, res, 1, v.r, FALSE);
RETURN FALSE;
END optionButton;
PROCEDURE optionGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR userName : ARRAY[0..79] OF CHAR;
realTabs : BOOLEAN;
val : BOOLEAN;
BEGIN
IF set
THEN
ConfVars.GetConfDefBool (cRealTabs, realTabs, FALSE);
WITH UserInformation.UserBLK DO
SetItem(tree, MausTauschrsc.ubox, Umbruch);
SetItem(tree, MausTauschrsc.savebox, autosave);
SetItem(tree, MausTauschrsc.lbox, UmlautWandler);
SetItem(tree, MausTauschrsc.undobox, AutoUndo);
SetItem(tree, MausTauschrsc.mgbox, ignoreRead);
SetItem(tree, MausTauschrsc.mfbox, ignoreFiltered);
SetItem(tree, MausTauschrsc.initialq, initialQuote);
SetItem(tree, MausTauschrsc.security, security);
SetItem(tree, MausTauschrsc.redirarc, RedirectArcer);
SetItem(tree, MausTauschrsc.eshowcr, ShowCR);
SetItem(tree, MausTauschrsc.osavepos, CatGlobal.saveAllPositions);
SetItem(tree, MausTauschrsc.erealtab, realTabs);
SetItem(tree, MausTauschrsc.einforo , infoRO );
ConfVars.GetConfDefBool (cSortGroups, val, TRUE);
SetItem(tree, MausTauschrsc.esortgr, val);
ConfVars.GetConfDefBool (cSortNames, val, TRUE);
SetItem(tree, MausTauschrsc.esortnam, val);
ConfVars.GetConfDefBool (cParseEffects, val, TRUE);
SetItem(tree, MausTauschrsc.esheff, val);
ConfVars.GetConfDefBool (cExternHelp, val, FALSE);
SetItem(tree, MausTauschrsc.oexthelp, val);
ConfVars.GetConfDefBool (cViewWrap, val, TRUE);
SetItem(tree, MausTauschrsc.viewwrap, val);
ConfVars.GetConfDefStr (cOwnName, userName, '');
VDIUtil.SetIntStr(tree, MausTauschrsc.waittime, waitingTime);
VDIUtil.SetIntStr(tree, MausTauschrsc.edleftm, editRight);
VDIUtil.SetIntStr(tree, MausTauschrsc.otabsize, tabSize);
mtUtils.SetObjcString(tree, MausTauschrsc.uflgtxt1, ustr1);
mtUtils.SetObjcString(tree, MausTauschrsc.uflgtxt2, ustr2);
mtUtils.SetObjcString(tree, MausTauschrsc.ehlpprot, helpServer);
mtUtils.SetObjcString(tree, MausTauschrsc.eusernam, userName);
END;
ELSE
IF INTEGER(BITSET(exit) - {15}) = MausTauschrsc.opok
THEN
WITH UserInformation.UserBLK DO
Umbruch := GetItem(tree, MausTauschrsc.ubox);
autosave := GetItem(tree, MausTauschrsc.savebox);
UmlautWandler := GetItem(tree, MausTauschrsc.lbox);
AutoUndo := GetItem(tree, MausTauschrsc.undobox);
ignoreRead := GetItem(tree, MausTauschrsc.mgbox);
ignoreFiltered := GetItem(tree, MausTauschrsc.mfbox);
initialQuote := GetItem(tree, MausTauschrsc.initialq);
security := GetItem(tree, MausTauschrsc.security);
RedirectArcer := GetItem(tree, MausTauschrsc.redirarc);
ShowCR := GetItem(tree, MausTauschrsc.eshowcr);
CatGlobal.saveAllPositions := GetItem(tree, MausTauschrsc.osavepos);
realTabs := GetItem(tree, MausTauschrsc.erealtab);
infoRO := GetItem(tree, MausTauschrsc.einforo);
VDIUtil.GetIntStr(tree, MausTauschrsc.waittime, waitingTime);
VDIUtil.GetIntStr(tree, MausTauschrsc.edleftm, editRight);
IF editRight < 10 THEN editRight := 10; END;
VDIUtil.GetIntStr(tree, MausTauschrsc.otabsize, tabSize);
mtUtils.ObjcString(tree, MausTauschrsc.uflgtxt1, ustr1);
mtUtils.ObjcString(tree, MausTauschrsc.uflgtxt2, ustr2);
mtUtils.ObjcString(tree, MausTauschrsc.ehlpprot, helpServer);
mtUtils.ObjcString(tree, MausTauschrsc.eusernam, userName);
MagicStrings.Assign (userName, CatGlobal.userName);
v.bool := ConfVars.SetConfigBool (cUmbruch, Umbruch);
v.bool := ConfVars.SetConfigBool (cAutosave, autosave); (* !! Info-Text anders *)
v.bool := ConfVars.SetConfigBool (cUmlaut, UmlautWandler);
v.bool := ConfVars.SetConfigBool (cAutoUndo, AutoUndo);
v.bool := ConfVars.SetConfigBool (cIgnoreRead, ignoreRead);
v.bool := ConfVars.SetConfigBool (cIgnoreFiltered, ignoreFiltered);
v.bool := ConfVars.SetConfigBool (cInitials, initialQuote);
v.bool := ConfVars.SetConfigBool (cSecurity, security);
v.bool := ConfVars.SetConfigBool (cRedirect, RedirectArcer);
v.bool := ConfVars.SetConfigBool (cShowCr, ShowCR);
v.bool := ConfVars.SetConfigBool (cSavePos, CatGlobal.saveAllPositions);
v.bool := ConfVars.SetConfigBool (cRealTabs, realTabs);
v.bool := ConfVars.SetConfigBool (cInfoReadonly, infoRO);
v.bool := ConfVars.SetConfigBool (cSortNames, mtUtils.InState (tree, MausTauschrsc.esortnam, MagicAES.SELECTED));
v.bool := ConfVars.SetConfigBool (cSortGroups, mtUtils.InState (tree, MausTauschrsc.esortgr, MagicAES.SELECTED));
v.bool := ConfVars.SetConfigBool (cParseEffects, mtUtils.InState (tree, MausTauschrsc.esheff, MagicAES.SELECTED));
v.bool := ConfVars.SetConfigBool (cExternHelp, mtUtils.InState (tree, MausTauschrsc.oexthelp, MagicAES.SELECTED));
v.bool := ConfVars.SetConfigBool (cViewWrap, mtUtils.InState (tree, MausTauschrsc.viewwrap, MagicAES.SELECTED));
(* Jetzt noch Integer und String-Vars schreiben *)
v.bool := ConfVars.SetConfigInt (cWaiting, waitingTime);
v.bool := ConfVars.SetConfigInt (cMargin, editRight);
v.bool := ConfVars.SetConfigInt (cTabsize, tabSize);
v.bool := ConfVars.SetConfigString (cUser1, ustr1);
v.bool := ConfVars.SetConfigString (cUser2, ustr2);
v.bool := ConfVars.SetConfigString (cHelpServer, helpServer);
v.bool := ConfVars.SetConfigString (cOwnName, userName);
END
END;
END;
END optionGetSetValues;
PROCEDURE DoOption();
VAR option : mtUtils.tObjcTree;
BEGIN
option := MausTauschrsc.TreeAddr^[MausTauschrsc.allg_cnf];
IF ~WinDials.OpenWinDial (option, FALSE,
optionGetSetValues,
optionGetSetValues,
optionButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
END;
END DoOption;
PROCEDURE abrufButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR res : INTEGER;
ok : BOOLEAN;
BEGIN
res := INTEGER(BITSET(button) - {15});
mtUtils.ExclState (tree, res, MagicAES.SELECTED);
ok := GetItem(tree, MausTauschrsc.getpers) OR
GetItem(tree, MausTauschrsc.getallg) OR
GetItem(tree, MausTauschrsc.getinf) ;
IF res = MausTauschrsc.gethelp
THEN
CatHelp.DoHelp (CatHelp.configInfile);
ok := FALSE
ELSIF (res # MausTauschrsc.getcance) & ~ok THEN
IF GetItem(tree, MausTauschrsc.messtoin) OR GetItem (tree, MausTauschrsc.statusin) THEN
ok := mtAlerts.Alert(1, '[2][CAT:|Das Infile knnte leer|sein, wenn Sie keine Nachricht|eingegeben haben.][[Ok|:[Nochmal]')=1;
ELSE
v.int := mtAlerts.Alert(1, '[3][CAT:|Das Infile wird ungltig,|da es keinen Inhalt hat!][[Stimmt]');
END;
END;
IF ok OR (res = MausTauschrsc.getcance)
THEN
RETURN TRUE;
END;
WinDials.WinDialDraw (tree, res, 1, v.r, FALSE);
RETURN FALSE;
END abrufButton;
PROCEDURE abrufGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
BEGIN
IF set
THEN
WITH UserInformation.UserBLK DO
SetItem(tree, MausTauschrsc.getpers, getPer);
SetItem(tree, MausTauschrsc.getownp, getOwnPers);
SetItem(tree, MausTauschrsc.getallg, getAllg);
SetItem(tree, MausTauschrsc.getinf, getInf);
SetItem(tree, MausTauschrsc.messtoin,messToIn);
SetItem(tree, MausTauschrsc.groupcha,groupChangeToIn);
SetItem(tree, MausTauschrsc.statusin,statusToIn);
END;
ELSE
exit := INTEGER(BITSET(exit) - {15});
IF exit # MausTauschrsc.getcance
THEN
WITH UserInformation.UserBLK DO
getPer := GetItem(tree, MausTauschrsc.getpers);
getOwnPers := GetItem(tree, MausTauschrsc.getownp);
getAllg := GetItem(tree, MausTauschrsc.getallg);
getInf := GetItem(tree, MausTauschrsc.getinf);
messToIn := GetItem(tree, MausTauschrsc.messtoin);
groupChangeToIn := GetItem(tree, MausTauschrsc.groupcha);
statusToIn := GetItem(tree, MausTauschrsc.statusin);
v.bool := ConfVars.SetConfigBool (cPersToIn, getPer);
v.bool := ConfVars.SetConfigBool (cSendPE, getOwnPers);
v.bool := ConfVars.SetConfigBool (cAllgToIn, getAllg);
v.bool := ConfVars.SetConfigBool (cInfoToIn, getInf);
v.bool := ConfVars.SetConfigBool (cMessToIn, messToIn);
v.bool := ConfVars.SetConfigBool (cGroupsToIn, groupChangeToIn);
v.bool := ConfVars.SetConfigBool (cStatusToIn, statusToIn);
END;
END;
END;
END abrufGetSetValues;
PROCEDURE DoAbruf();
VAR abruf : mtUtils.tObjcTree;
BEGIN
abruf := MausTauschrsc.TreeAddr^[MausTauschrsc.abruf];
IF ~WinDials.OpenWinDial (abruf, FALSE,
abrufGetSetValues,
abrufGetSetValues,
abrufButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
END;
END DoAbruf;
PROCEDURE DoInfos();
VAR str : ARRAY[0..255] OF CHAR;
BEGIN
MagicStrings.Assign ("", str);
v.bool := InfoDlg.doInfoList (FALSE, str);
END DoInfos;
TYPE printerInfo = RECORD
cfgFile : CatTypes.String255;
cfgPath : CatTypes.pathStrType;
cfgName : CatTypes.nameStrType;
cfgExt : CatTypes.extStrType;
END;
prInfoPtr = POINTER TO printerInfo;
PROCEDURE printerButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR but : INTEGER;
prnConf,
prnTypeSel,
prnStyleSel,
prnIFSel : mtUtils.tObjcTree;
x, y : INTEGER;
select : INTEGER;
selStr : ARRAY [0..40] OF CHAR;
t : Trick;
res : BOOLEAN;
name : CatTypes.String127;
prInfo : prInfoPtr;
BEGIN
prInfo := private;
prnTypeSel:= MausTauschrsc.TreeAddr^[MausTauschrsc.selectbx];
prnStyleSel:= MausTauschrsc.TreeAddr^[MausTauschrsc.psizebox];
prnIFSel := MausTauschrsc.TreeAddr^[MausTauschrsc.ifbox];
prnConf := tree;
but := INTEGER(BITSET(button) - {15});
CASE but OF
MausTauschrsc.oprtsiz0,
MausTauschrsc.oprtsiz1:
but := MausTauschrsc.oprtsiz1;
MagicAES.ObjcOffset (tree, but, x, y);
t := ADR (prnConf^[but].obState);
select := mtPopups.TreePopup (prnStyleSel, x, y, ORD(t^.hi))-1;
IF select >= 0 THEN
t^.hi := CHR(select);
VDIUtil.SetXString (tree, but, prnStyleSel, select);
WinDials.WinDialDraw (tree, but, 0, v.r, FALSE);
END;|
MausTauschrsc.oprtsiz2:
t := ADR (prnConf^[but-1].obState);
t^.hi := CHR((ORD(t^.hi)+1) MOD 3);
select := ORD (t^.hi);
VDIUtil.SetXString (tree, but-1, prnStyleSel, select);
WinDials.WinDialDraw (tree, but-1, 0, v.r, FALSE); |
MausTauschrsc.oprtopt0,
MausTauschrsc.oprtopt:
but := MausTauschrsc.oprtopt;
MagicAES.ObjcOffset (tree, but, x, y);
t := ADR (prnConf^[but].obState);
select := mtPopups.TreePopup (prnTypeSel, x, y, ORD(t^.hi))-1;
IF select >= 0 THEN
t^.hi := CHR(select);
VDIUtil.SetXString (tree, but, prnTypeSel, select);
WinDials.WinDialDraw (tree, but, 0, v.r, FALSE);
END;|
MausTauschrsc.oprtopt2:
t := ADR (prnConf^[but-1].obState);
t^.hi := CHR((ORD(t^.hi)+1) MOD 4);
select := ORD (t^.hi);
VDIUtil.SetXString (tree, but-1, prnTypeSel, select);
WinDials.WinDialDraw (tree, but-1, 0, v.r, FALSE); |
MausTauschrsc.ointerfc0,
MausTauschrsc.ointerfc1:
but := MausTauschrsc.ointerfc1;
MagicAES.ObjcOffset (tree, but, x, y);
t := ADR (prnConf^[but].obState);
select := mtPopups.TreePopup (prnIFSel, x, y, ORD(t^.hi))-1;
IF select >= 0 THEN
t^.hi := CHR(select);
VDIUtil.SetXString (tree, but, prnIFSel, select);
WinDials.WinDialDraw (tree, but, 0, v.r, FALSE);
END;|
MausTauschrsc.ointerfc2:
t := ADR (prnConf^[but-1].obState);
t^.hi := CHR((ORD(t^.hi)+1) MOD 2);
select := ORD (t^.hi);
VDIUtil.SetXString (tree, but-1, prnIFSel, select);
WinDials.WinDialDraw (tree, but-1, 0, v.r, FALSE); |
MausTauschrsc.oselcfg0,
MausTauschrsc.oselcfg:
but := MausTauschrsc.oselcfg;
res := CatGlobal.FselGet (prInfo^.cfgPath, prInfo^.cfgName, '*.cfg', 'CFG-Datei auswhlen', TRUE);
IF res & (prInfo^.cfgName[0] # '')
THEN
MagicStrings.Assign (prInfo^.cfgPath, prInfo^.cfgFile);
MagicStrings.Append (prInfo^.cfgName, prInfo^.cfgFile);
Printer.LoadCFGFile (prInfo^.cfgFile);
IF Printer.Response = Printer.CFGnotFound
THEN
MTE.info ('[3][CAT:|CFG-File nicht|gefunden!][[Abbruch]');
ELSIF Printer.Response = Printer.wrongIdent
THEN
MTE.info ('[3][CAT:|Diese Datei ist|keine CFG-Datei!][[Abbruch]');
ELSIF Printer.Response = Printer.done
THEN
Printer.GetPrnName (name);
mtUtils.SetObjcString (tree, MausTauschrsc.oselcfg, prInfo^.cfgName);
mtUtils.SetObjcString (tree, MausTauschrsc.printname, name);
mtUtils.CalcArea (tree, MausTauschrsc.printname, v.r);
WinDials.WinDialDraw (tree, 0, 8, v.r, TRUE);
END;
ELSIF res
THEN
Printer.FreeCFGFile();
MagicStrings.Assign ('', prInfo^.cfgFile);
Printer.GetPrnName (name);
mtUtils.SetObjcString (tree, MausTauschrsc.printname, name);
MagicStrings.Assign ('noname.cfg',prInfo^.cfgName);
mtUtils.SetObjcString (tree, MausTauschrsc.oselcfg, prInfo^.cfgName);
mtUtils.CalcArea (tree, MausTauschrsc.printname, v.r);
WinDials.WinDialDraw (tree, 0, 8, v.r, TRUE);
END;
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
WinDials.WinDialDraw (tree, but, 0, v.r, FALSE); |
MausTauschrsc.prok,
MausTauschrsc.prcancel:
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
RETURN TRUE; |
ELSE
END;
RETURN FALSE;
END printerButton;
PROCEDURE printerGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR prnTypeSel,
prnStyleSel,
prnIFSel : mtUtils.tObjcTree;
val : BOOLEAN;
intVal : INTEGER;
name : ARRAY [0..79] OF CHAR;
prInfo : prInfoPtr;
BEGIN
prInfo := private;
prnTypeSel:= MausTauschrsc.TreeAddr^[MausTauschrsc.selectbx];
prnStyleSel:= MausTauschrsc.TreeAddr^[MausTauschrsc.psizebox];
prnIFSel := MausTauschrsc.TreeAddr^[MausTauschrsc.ifbox];
IF set
THEN (* set *)
(* Noch Namen des CFG-Files *)
IF ConfVars.GetConfigString (cPrtCfg, prInfo^.cfgFile)
THEN
mtDir.SplitPath (prInfo^.cfgFile, prInfo^.cfgPath, prInfo^.cfgName, prInfo^.cfgExt);
ELSE
MagicStrings.Assign ('', prInfo^.cfgFile);
MagicStrings.Assign ('noname.cfg', prInfo^.cfgName);
MagicStrings.Assign (MTPaths.DataPath, prInfo^.cfgPath);
END;
mtUtils.SetObjcString (tree, MausTauschrsc.oselcfg, prInfo^.cfgName);
ConfVars.GetConfDefInt (cPrtMargin, intVal, 0);
VDIUtil.SetIntStr (tree, MausTauschrsc.oprleftm, intVal);
ConfVars.GetConfDefInt (cPrtLines, intVal, 0);
intVal := intVal MOD 10; (* Maximal 0 bis 9 *)
VDIUtil.SetIntStr (tree, MausTauschrsc.oprlines, intVal);
ConfVars.GetConfDefBool (cPrtNlq, val, FALSE);
mtUtils.SetState (tree, MausTauschrsc.oprnnlq, MagicAES.SELECTED, val);
ConfVars.GetConfDefBool (cPrtFF, val, FALSE);
mtUtils.SetState (tree, MausTauschrsc.oformfeed, MagicAES.SELECTED, val);
Printer.GetPrnName (name);
mtUtils.SetObjcString (tree, MausTauschrsc.printname, name);
ConfVars.GetConfDefInt (cPrtHeader, intVal, 0);
VDIUtil.SetXState (tree, MausTauschrsc.oprtopt, ORD(intVal));
VDIUtil.SetXString (tree, MausTauschrsc.oprtopt, prnTypeSel, ORD(intVal));
ConfVars.GetConfDefInt (cPrtPort, intVal, 0);
VDIUtil.SetXState (tree, MausTauschrsc.ointerfc1, ORD(intVal));
VDIUtil.SetXString (tree, MausTauschrsc.ointerfc1, prnIFSel, ORD(intVal));
ConfVars.GetConfDefInt (cPrtStyle, intVal, 0);
VDIUtil.SetXState (tree, MausTauschrsc.oprtsiz1, ORD(intVal));
VDIUtil.SetXString (tree, MausTauschrsc.oprtsiz1, prnStyleSel, ORD(intVal));
ELSE
exit := INTEGER(BITSET(exit) - {15});
IF exit = MausTauschrsc.prok
THEN
v.bool := ConfVars.SetConfigInt (cPrtHeader, VDIUtil.GetXState (tree, MausTauschrsc.oprtopt));
v.bool := ConfVars.SetConfigInt (cPrtPort, VDIUtil.GetXState (tree, MausTauschrsc.ointerfc1));
v.bool := ConfVars.SetConfigInt (cPrtStyle, VDIUtil.GetXState (tree, MausTauschrsc.oprtsiz1));
v.bool := ConfVars.SetConfigBool (cPrtNlq, mtUtils.InState (tree, MausTauschrsc.oprnnlq, MagicAES.SELECTED));
v.bool := ConfVars.SetConfigBool (cPrtFF, mtUtils.InState (tree, MausTauschrsc.oformfeed, MagicAES.SELECTED));
VDIUtil.GetIntStr (tree, MausTauschrsc.oprleftm, intVal);
v.bool := ConfVars.SetConfigInt (cPrtMargin, intVal);
VDIUtil.GetIntStr (tree, MausTauschrsc.oprlines, intVal);
v.bool := ConfVars.SetConfigInt (cPrtLines, intVal);
IF prInfo^.cfgFile[0] # '' THEN v.bool := ConfVars.SetConfigString (cPrtCfg, prInfo^.cfgFile); END;
ELSE
ConfVars.GetConfDefStr (cPrtCfg, prInfo^.cfgFile, '');
IF prInfo^.cfgFile[0] # '' THEN Printer.LoadCFGFile (prInfo^.cfgFile); END;
END;
DISPOSE (prInfo);
END;
END printerGetSetValues;
PROCEDURE doPrinter();
VAR printConf : mtUtils.tObjcTree;
prInfo : prInfoPtr;
BEGIN
printConf := MausTauschrsc.TreeAddr^[MausTauschrsc.prnconf];
NEW (prInfo);
IF prInfo = NIL
THEN
MTE.noMemAlert();
RETURN
END;
IF ~WinDials.OpenWinDial (printConf, FALSE,
printerGetSetValues,
printerGetSetValues,
printerButton,
WinDials.defDraw,
"",
prInfo)
THEN
DISPOSE (prInfo);
MTE.noWinDialAlert();
END;
END doPrinter;
PROCEDURE buildVarName (REF name: ARRAY OF CHAR; number: INTEGER; VAR newName: ARRAY OF CHAR);
BEGIN
MagicStrings.Assign (name, newName);
MagicStrings.Append (StrConv.IntToStr (number, 0), newName);
END buildVarName;
PROCEDURE listButton (obTree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR tree,
sortPop : mtUtils.tObjcTree;
x, y : INTEGER;
but : INTEGER;
t : Trick;
select : INTEGER;
BEGIN
tree := obTree;
sortPop := MausTauschrsc.TreeAddr^[MausTauschrsc.lsortpop];
but := INTEGER(BITSET(button) - {15});
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
CASE but OF
MausTauschrsc.lcsort0,
MausTauschrsc.lcsort1:
but := MausTauschrsc.lcsort1;
MagicAES.ObjcOffset (tree, but, x, y);
t := ADR (tree^[but].obState);
select := mtPopups.TreePopup (sortPop, x, y, ORD(t^.hi))-1;
IF select >= 0 THEN
t^.hi := CHR(select);
VDIUtil.SetXString (tree, but, sortPop, select);
WinDials.WinDialDraw (tree, but, 0, v.r, FALSE);
END;|
MausTauschrsc.lcsort2:
t := ADR (tree^[but-1].obState);
t^.hi := CHR((ORD(t^.hi)+1) MOD 6);
select := ORD (t^.hi);
VDIUtil.SetXString (tree, but-1, sortPop, select);
WinDials.WinDialDraw (tree, but-1, 0, v.r, FALSE); |
MausTauschrsc.lchelp:
CatHelp.DoHelp (CatHelp.listconf);
WinDials.WinDialDraw (tree, but, 1, v.r, FALSE); |
MausTauschrsc.lcok,
MausTauschrsc.lcquit:
RETURN TRUE;
ELSE
END;
RETURN FALSE;
END listButton;
PROCEDURE listGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR sortPop : mtUtils.tObjcTree;
intVal : INTEGER;
boolVal : BOOLEAN;
x, y : INTEGER;
varname : ARRAY [0..127] OF CHAR;
BEGIN
sortPop := MausTauschrsc.TreeAddr^[MausTauschrsc.lsortpop];
IF set
THEN
ConfVars.GetConfDefBool (cListShrink, boolVal, FALSE);
mtUtils.SetState (tree, MausTauschrsc.lcshort, MagicAES.SELECTED, boolVal);
ConfVars.GetConfDefBool (cListFilter, boolVal, FALSE);
mtUtils.SetState (tree, MausTauschrsc.lcfilt, MagicAES.SELECTED, boolVal);
ConfVars.GetConfDefBool (cListCase, boolVal, FALSE);
mtUtils.SetState (tree, MausTauschrsc.lccase, MagicAES.SELECTED, boolVal);
FOR x := 1 TO 10 DO
buildVarName (cListSearch, x, varname);
ConfVars.GetConfDefBool (varname, boolVal, FALSE);
mtUtils.SetState (tree, MausTauschrsc.lckonf1+x-1, MagicAES.SELECTED, boolVal);
END;
ConfVars.GetConfDefInt (cListSort, intVal, 3);
VDIUtil.SetXState (tree, MausTauschrsc.lcsort1, ORD(intVal));
VDIUtil.SetXString (tree, MausTauschrsc.lcsort1, sortPop, intVal);
ELSE
exit := INTEGER(BITSET(exit) - {15});
IF exit = MausTauschrsc.lcok
THEN
(* genderte Konfiguration auslesen und speichern *)
boolVal := mtUtils.InState (tree, MausTauschrsc.lcshort, MagicAES.SELECTED);
v.bool := ConfVars.SetConfigBool (cListShrink, boolVal);
boolVal := mtUtils.InState (tree, MausTauschrsc.lccase, MagicAES.SELECTED);
v.bool := ConfVars.SetConfigBool (cListCase, boolVal);
intVal := VDIUtil.GetXState (tree, MausTauschrsc.lcsort1);
v.bool := ConfVars.SetConfigInt (cListSort, intVal);
boolVal := mtUtils.InState (tree, MausTauschrsc.lcfilt, MagicAES.SELECTED);
v.bool := ConfVars.SetConfigBool (cListFilter, boolVal);
FOR x := 1 TO 10 DO
buildVarName (cListSearch, x, varname);
boolVal := mtUtils.InState (tree, MausTauschrsc.lckonf1+x-1, MagicAES.SELECTED);
v.bool := ConfVars.SetConfigBool (varname, boolVal);
END;
END;
END;
END listGetSetValues;
PROCEDURE doList ();
VAR tree : mtUtils.tObjcTree;
BEGIN
tree := MausTauschrsc.TreeAddr^[MausTauschrsc.list_cnf];
IF ~WinDials.OpenWinDial (tree, FALSE,
listGetSetValues,
listGetSetValues,
listButton,
WinDials.defDraw,
"",
NIL)
THEN
MTE.noWinDialAlert();
END;
END doList;
PROCEDURE editButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR exitPtr: POINTER TO INTEGER;
but : INTEGER;
BEGIN
exitPtr := private;
but := INTEGER(BITSET(button) - {15});
CASE but OF
MausTauschrsc.tabok,
MausTauschrsc.tabquit :
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
exitPtr^ := but;
RETURN TRUE; |
MausTauschrsc.tabhelp :
CatHelp.DoHelp (CatHelp.confEdit);
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
mtDials.DialDraw (tree, but, 1, v.r, FALSE); |
ELSE
END;
RETURN FALSE;
END editButton;
PROCEDURE DoRealEditor (wdw : INTEGER);
VAR exit : INTEGER;
str : ARRAY[0..20] OF CHAR;
nr : INTEGER;
redraw : BOOLEAN;
varname: CatTypes.String127;
i : INTEGER;
isTop : BOOLEAN;
tabBox : mtUtils.tObjcTree;
BEGIN
(* Box initialisieren *)
isTop := CatEdit.IsEditTop (wdw);
tabBox := MausTauschrsc.TreeAddr^[MausTauschrsc.tabbox];
(*
mtUtils.SetState (tabBox, MausTauschrsc.taext0, MagicAES.DISABLED, ~isTop);
mtUtils.SetState (tabBox, MausTauschrsc.tatabw0, MagicAES.DISABLED, ~isTop);
mtUtils.SetState (tabBox, MausTauschrsc.taumbr0, MagicAES.DISABLED, ~isTop);
mtUtils.SetState (tabBox, MausTauschrsc.tartab0, MagicAES.DISABLED, ~isTop);
mtUtils.SetState (tabBox, MausTauschrsc.taback0, MagicAES.DISABLED, ~isTop);
mtUtils.SetState (tabBox, MausTauschrsc.talinel0, MagicAES.DISABLED, ~isTop);
mtUtils.SetFlag (tabBox, MausTauschrsc.talinel0, MagicAES.EDITABLE, isTop);
mtUtils.SetFlag (tabBox, MausTauschrsc.tatabw0, MagicAES.EDITABLE, isTop);
IF isTop
THEN
*)
(* Erstmal die Topwindow-Sachen *)
CatEdit.GetTabsize (wdw, nr);
mtUtils.SetObjcString (tabBox, MausTauschrsc.tatabw0, StrConv.IntToStr (nr,0));
SetItem (tabBox, MausTauschrsc.taumbr0, CatEdit.GetMode (wdw, CatEdit.wrapMode));
SetItem (tabBox, MausTauschrsc.taback0, CatEdit.GetMode (wdw, CatEdit.autoBackup));
SetItem (tabBox, MausTauschrsc.tartab0, CatEdit.GetMode (wdw, CatEdit.tabMode));
CatEdit.GetMargins (wdw, nr);
mtUtils.SetObjcString (tabBox, MausTauschrsc.talinel0, StrConv.IntToStr (nr,0));
(* END; *)
(* Und jetzt die ber die Configstrings *)
FOR i := 1 TO 8 DO
buildVarName (cExtension, i, varname);
ConfVars.GetConfDefStr (varname, str, "");
mtUtils.SetObjcString (tabBox, MausTauschrsc.taext1+i-1, str);
buildVarName (cExtTabsize, i, varname);
ConfVars.GetConfDefInt (varname, nr, 4);
mtUtils.SetObjcString (tabBox, MausTauschrsc.tatabw1+i-1, StrConv.IntToStr (nr,0));
buildVarName (cExtHardTabs, i, varname);
ConfVars.GetConfDefBool (varname, v.bool, FALSE);
SetItem (tabBox, MausTauschrsc.tartab1+i-1, v.bool);
buildVarName (cExtWordWrap, i, varname);
ConfVars.GetConfDefBool (varname, v.bool, FALSE);
SetItem (tabBox, MausTauschrsc.taumbr1+i-1, v.bool);
buildVarName (cExtRightMargin, i, varname);
ConfVars.GetConfDefInt (varname, nr, 255);
mtUtils.SetObjcString (tabBox, MausTauschrsc.talinel1+i-1, StrConv.IntToStr (nr,0));
buildVarName (cExtAutoBackup, i, varname);
ConfVars.GetConfDefBool (varname, v.bool, FALSE);
SetItem (tabBox, MausTauschrsc.taback1+i-1, v.bool);
END;
IF ~WinDials.OpenWinDial (tabBox, FALSE,
WinDials.defSet,
WinDials.defSet,
editButton,
WinDials.defDraw,
"",
ADR(exit))
THEN
MTE.noWinDialAlert();
END;
WinDials.WinDialHandleEvents ();
(* exit := WinDials.WinDialDo (tabBox, 0); *)
IF exit = MausTauschrsc.tabok THEN
redraw := FALSE;
(* Erstmal die Topwindow-Sachen *)
CatEdit.SetMode (wdw, CatEdit.wrapMode, GetItem (tabBox, MausTauschrsc.taumbr0));
CatEdit.SetMode (wdw, CatEdit.autoBackup, GetItem (tabBox, MausTauschrsc.taback0));
CatEdit.SetMode (wdw, CatEdit.tabMode, GetItem (tabBox, MausTauschrsc.tartab0));
mtUtils.ObjcString (tabBox, MausTauschrsc.tatabw0, str);
v.card := 0;
nr := StrConv.StrToInt (str, v.card, v.bool);
IF v.bool
THEN
CatEdit.SetTabsize (wdw, nr);
IF CatEdit.GetMode (wdw, CatEdit.tabMode)
THEN
redraw := TRUE;
END;
END;
mtUtils.ObjcString (tabBox, MausTauschrsc.talinel0, str);
v.card := 0;
nr := StrConv.StrToInt (str, v.card, v.bool);
IF v.bool
THEN
CatEdit.SetMargins (wdw, nr, GetItem (tabBox, MausTauschrsc.taumbr0));
redraw := TRUE;
END;
IF redraw
THEN
WdwManager.FullRedrawWdw (wdw);
END;
(* Und jetzt die ber die Configstrings *)
FOR i := 1 TO 8 DO
mtUtils.ObjcString (tabBox, MausTauschrsc.taext1+i-1, str);
IF str[0] # ''
THEN
buildVarName (cExtension, i, varname);
v.bool := ConfVars.SetConfigString (varname, str);
mtUtils.ObjcString (tabBox, MausTauschrsc.tatabw1+i-1, str);
v.card := 0;
nr := StrConv.StrToInt (str, v.card, v.bool);
IF v.bool
THEN
buildVarName (cExtTabsize, i, varname);
v.bool := ConfVars.SetConfigInt (varname, nr);
END;
buildVarName (cExtHardTabs, i, varname);
v.bool := ConfVars.SetConfigBool (varname, GetItem (tabBox, MausTauschrsc.tartab1+i-1));
buildVarName (cExtWordWrap, i, varname);
v.bool := ConfVars.SetConfigBool (varname, GetItem (tabBox, MausTauschrsc.taumbr1+i-1));
mtUtils.ObjcString (tabBox, MausTauschrsc.talinel1+i-1, str);
v.card := 0;
nr := StrConv.StrToInt (str, v.card, v.bool);
IF v.bool
THEN
buildVarName (cExtRightMargin, i, varname);
v.bool := ConfVars.SetConfigInt (varname, nr);
END;
buildVarName (cExtAutoBackup, i, varname);
v.bool := ConfVars.SetConfigBool (varname, GetItem (tabBox, MausTauschrsc.taback1+i-1));
ELSE
(* Konfiguration lschen!! *)
buildVarName (cExtension, i, varname);
ConfVars.DeleteConfigVar (varname);
buildVarName (cExtTabsize, i, varname);
ConfVars.DeleteConfigVar (varname);
buildVarName (cExtHardTabs, i, varname);
ConfVars.DeleteConfigVar (varname);
buildVarName (cExtWordWrap, i, varname);
ConfVars.DeleteConfigVar (varname);
buildVarName (cExtRightMargin, i, varname);
ConfVars.DeleteConfigVar (varname);
buildVarName (cExtAutoBackup, i, varname);
ConfVars.DeleteConfigVar (varname);
END;
END;
END;
END DoRealEditor;
PROCEDURE doEditor (wdw : INTEGER);
VAR edBox : mtUtils.tObjcTree;
tabsiz,
margin : INTEGER;
str : ARRAY [0..9] OF CHAR;
BEGIN
IF grin.grinWindowTop (wdw)
THEN
edBox := MausTauschrsc.TreeAddr^[MausTauschrsc.grin_cnf];
mtUtils.SetState (edBox, MausTauschrsc.gshoweff, MagicAES.SELECTED, CatEdit.GetMode (wdw, CatEdit.effMode));
mtUtils.SetState (edBox, MausTauschrsc.gtabs, MagicAES.SELECTED, CatEdit.GetMode (wdw, CatEdit.tabMode));
CatEdit.GetTabsize (wdw, tabsiz);
VDIUtil.SetIntStr (edBox, MausTauschrsc.gtabsiz, tabsiz);
IF WinDials.WinDialDo (edBox, 0) = MausTauschrsc.gr_ok
THEN
CatEdit.SetMode (wdw, CatEdit.tabMode,
mtUtils.InState (edBox, MausTauschrsc.gtabs, MagicAES.SELECTED));
CatEdit.SetMode (wdw, CatEdit.effMode,
mtUtils.InState (edBox, MausTauschrsc.gshoweff, MagicAES.SELECTED));
VDIUtil.GetIntStr (edBox, MausTauschrsc.gtabsiz, tabsiz);
CatEdit.SetTabsize (wdw, tabsiz);
WdwManager.FullRedrawWdw (wdw);
END;
ELSIF CatEdit.IsEditTop (wdw)
THEN
(*
edBox := MausTauschrsc.TreeAddr^[MausTauschrsc.edit_cnf];
mtUtils.SetState (edBox, MausTauschrsc.edwrap, MagicAES.SELECTED, CatEdit.GetMode (wdw, CatEdit.wrapMode));
mtUtils.SetState (edBox, MausTauschrsc.edshowc, MagicAES.SELECTED, CatEdit.GetMode (wdw, CatEdit.crMode));
mtUtils.SetState (edBox, MausTauschrsc.edtabs, MagicAES.SELECTED, CatEdit.GetMode (wdw, CatEdit.tabMode));
CatEdit.GetTabsize (wdw, tabsiz);
VDIUtil.SetIntStr (edBox, MausTauschrsc.edtabsiz, tabsiz);
CatEdit.GetMargins (wdw, margin);
VDIUtil.SetIntStr (edBox, MausTauschrsc.edmargin, margin);
IF WinDials.WinDialDo (edBox, 0) = MausTauschrsc.edcnfok
THEN
CatEdit.SetMode (wdw, CatEdit.tabMode,
mtUtils.InState (edBox, MausTauschrsc.edtabs, MagicAES.SELECTED));
CatEdit.SetMode (wdw, CatEdit.crMode,
mtUtils.InState (edBox, MausTauschrsc.edshowc, MagicAES.SELECTED));
VDIUtil.GetIntStr (edBox, MausTauschrsc.edtabsiz, tabsiz);
CatEdit.SetTabsize (wdw, tabsiz);
VDIUtil.GetIntStr (edBox, MausTauschrsc.edmargin, margin);
CatEdit.SetMargins (wdw, margin,
mtUtils.InState (edBox, MausTauschrsc.edwrap, MagicAES.SELECTED));
WdwManager.FullRedrawWdw (wdw);
END;
*)
DoRealEditor (wdw);
END;
END doEditor;
TYPE colorInfo = RECORD
wdw: INTEGER;
isMess,
isEdit,
isGrin,
isTree,
isList : BOOLEAN;
END;
colorInfoPtr = POINTER TO colorInfo;
PROCEDURE SetObCol (tree : mtUtils.tObjcTree; obIdx : INTEGER; col : INTEGER);
BEGIN
col := col MOD 16;
tree^[obIdx].obSpec.Box.flags := BITSET(INTEGER(tree^[obIdx].obSpec.Box.flags) DIV 16 * 16 + col);
END SetObCol;
PROCEDURE colorButton (obTree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR colPopup,
effPopup,
colorBox : mtUtils.tObjcTree;
select,
x, y,
but : INTEGER;
t : Trick;
BEGIN
colorBox := obTree;
colPopup := MausTauschrsc.TreeAddr^[MausTauschrsc.colpopup];
effPopup := MausTauschrsc.TreeAddr^[MausTauschrsc.effpopup];
but := INTEGER(BITSET(button) - {15});
mtUtils.ExclState(colorBox, but, MagicAES.SELECTED);
IF but = MausTauschrsc.coqstr
THEN
but := MausTauschrsc.coqcol1;
ELSIF but = MausTauschrsc.cotstr
THEN
but := MausTauschrsc.cotcol1;
ELSIF but = MausTauschrsc.cobstr
THEN
but := MausTauschrsc.cobcol1;
ELSIF but = MausTauschrsc.coostr
THEN
but := MausTauschrsc.coocol1;
END;
CASE but OF
MausTauschrsc.cotcol1,
MausTauschrsc.coqcol1,
MausTauschrsc.cobcol1,
MausTauschrsc.coocol1 :
MagicAES.ObjcOffset (colorBox, but, x, y);
t := ADR (colorBox^[but].obState);
IF (mtAppl.Bitplanes > 1) OR ((but # MausTauschrsc.coqcol1) & (but # MausTauschrsc.coocol1))
THEN
select := mtPopups.TreePopup (colPopup, x, y, ORD(t^.hi) DIV 2) - 1;
select := (select DIV 2) * 2 + 1;
IF select > INTEGER(2*maxColors)
THEN
select := -1;
END;
ELSE
select := mtPopups.TreePopup (effPopup, x, y, ORD(t^.hi)) - 1;
END;
IF select >= 0 THEN
t^.hi := CHR(select);
IF (mtAppl.Bitplanes > 1) OR ((but # MausTauschrsc.coqcol1) & (but # MausTauschrsc.coocol1))
THEN
VDIUtil.SetXString (colorBox, but, colPopup, select);
SetObCol (colorBox, but+1, (select DIV 2));
ELSE
VDIUtil.SetXString (colorBox, but, effPopup, select);
END;
mtDials.DialDraw (colorBox, but, 1, v.r, FALSE);
END;|
MausTauschrsc.cotcol2,
MausTauschrsc.coqcol2,
MausTauschrsc.cobcol2,
MausTauschrsc.coocol2 :
t := ADR (colorBox^[but+1].obState);
IF (mtAppl.Bitplanes > 1) OR ((but # MausTauschrsc.coqcol2) & (but # MausTauschrsc.coocol2))
THEN
t^.hi := CHR((ORD(t^.hi)+2) MOD 32);
t^.hi := CHR(ORD(t^.hi) MOD (2*maxColors));
ELSE
t^.hi := CHR((ORD(t^.hi)+1) MOD 4);
END;
select := ORD (t^.hi);
IF (mtAppl.Bitplanes > 1) OR ((but # MausTauschrsc.coqcol2) & (but # MausTauschrsc.coocol2))
THEN
VDIUtil.SetXString (colorBox, but+1, colPopup, select);
SetObCol (colorBox, but+2, (select DIV 2));
ELSE
VDIUtil.SetXString (colorBox, but+1, effPopup, select);
END;
mtDials.DialDraw (colorBox, but+1, 1, v.r, FALSE); |
MausTauschrsc.cook,
MausTauschrsc.coquit:
RETURN TRUE; |
ELSE
END; (* CASE *)
RETURN FALSE;
END colorButton;
PROCEDURE colorGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
CONST quoteColStr= '[Quotefarbe:';
notReadStr = '[Ungelesene:';
holdBackStr= '[Zurckgehaltene:';
quoteEffStr= '[Quoteeffekt:';
subjectStr = '[Stichwortwechsel:';
VAR coInfo: colorInfoPtr;
tCol,
qCol,
qEff,
oCol,
oEff,
bCol : INTEGER;
colPopup,
effPopup : mtUtils.tObjcTree;
midDisable : BOOLEAN;
BEGIN
exit := INTEGER(BITSET(exit) - {15});
colPopup := MausTauschrsc.TreeAddr^[MausTauschrsc.colpopup];
coInfo := private;
colPopup := MausTauschrsc.TreeAddr^[MausTauschrsc.colpopup];
effPopup := MausTauschrsc.TreeAddr^[MausTauschrsc.effpopup];
IF set
THEN
coInfo^.isGrin := grin.grinWindowTop (coInfo^.wdw);
coInfo^.isEdit := CatEdit.IsEditTop (coInfo^.wdw) & ~coInfo^.isGrin;
coInfo^.isList := msgList.listWindowTop (coInfo^.wdw);
coInfo^.isMess := MsgWindow.msgWindowTop (coInfo^.wdw);
coInfo^.isTree := treeList.treeWindowTop (coInfo^.wdw);
(* Jetzt Strings setzen fr die einzelnen Objekte *)
IF coInfo^.isMess
THEN
mtUtils.SetObjcString (tree, MausTauschrsc.coqstr, holdBackStr);
ELSIF coInfo^.isList
THEN
mtUtils.SetObjcString (tree, MausTauschrsc.coqstr, notReadStr);
ELSIF coInfo^.isTree
THEN
mtUtils.SetObjcString (tree, MausTauschrsc.coqstr, subjectStr);
mtUtils.SetObjcString (tree, MausTauschrsc.coostr, notReadStr);
ELSE
IF mtAppl.Bitplanes > 1
THEN
mtUtils.SetObjcString (tree, MausTauschrsc.coqstr, quoteColStr);
ELSE
mtUtils.SetObjcString (tree, MausTauschrsc.coqstr, quoteEffStr);
END;
END;
(* Ggf. mittlere Zeile disablen *)
midDisable := coInfo^.isEdit (* OR coInfo^.isMess*) OR (coInfo^.isTree & (mtAppl.Bitplanes = 1));
mtUtils.SetState (tree, MausTauschrsc.coqstr, MagicAES.DISABLED, midDisable);
mtUtils.SetState (tree, MausTauschrsc.coqcol1, MagicAES.DISABLED, midDisable);
mtUtils.SetState (tree, MausTauschrsc.coqcol2, MagicAES.DISABLED, midDisable);
mtUtils.SetFlag (tree, MausTauschrsc.coqcol0, MagicAES.TOUCHEXIT, ~midDisable);
mtUtils.SetFlag (tree, MausTauschrsc.coqcol1, MagicAES.TOUCHEXIT, ~midDisable);
mtUtils.SetFlag (tree, MausTauschrsc.coqcol2, MagicAES.TOUCHEXIT, ~midDisable);
mtUtils.SetFlag (tree, MausTauschrsc.coocolbox, MagicAES.HIDETREE, ~coInfo^.isList & ~coInfo^.isTree);
mtUtils.SetFlag (tree, MausTauschrsc.coostr, MagicAES.HIDETREE, ~coInfo^.isList & ~coInfo^.isTree);
(* Jetzt die einzelnen Farben holen und Objekte vorbereiten *)
IF coInfo^.isGrin
THEN
ConfVars.GetConfDefInt (cGrinTextCol, tCol, 1);
ConfVars.GetConfDefInt (cGrinQuoteCol, qCol, 1);
ConfVars.GetConfDefInt (cGrinQuoteEff, qEff, 1);
ConfVars.GetConfDefInt (cGrinBackCol, bCol, 0);
oCol := 1;
oEff := 1;
ELSIF coInfo^.isEdit
THEN
ConfVars.GetConfDefInt (cEditTextCol, tCol, 1);
ConfVars.GetConfDefInt (cEditBackCol, bCol, 0);
qCol := 1;
oCol := 1;
qEff := 1;
oEff := 1;
ELSIF coInfo^.isList
THEN
ConfVars.GetConfDefInt (cListTextCol, tCol, 1);
ConfVars.GetConfDefInt (cListQuoteCol, qCol, 1);
ConfVars.GetConfDefInt (cListQuoteEff, qEff, 1);
ConfVars.GetConfDefInt (cListBackCol, bCol, 0);
ConfVars.GetConfDefInt (cListOwnCol, oCol, 1);
ConfVars.GetConfDefInt (cListOwnEff, oEff, 1);
ELSIF coInfo^.isMess
THEN
ConfVars.GetConfDefInt (cMsgTextCol, tCol, 1);
ConfVars.GetConfDefInt (cMsgBackCol, bCol, 0);
ConfVars.GetConfDefInt (cMsgHoldCol, qCol, 1);
ConfVars.GetConfDefInt (cMsgHoldEff, qEff, 1);
oCol := 1;
oEff := 1;
ELSIF coInfo^.isTree
THEN
ConfVars.GetConfDefInt (cTreeTextCol, tCol, 1);
ConfVars.GetConfDefInt (cTreeBackCol, bCol, 0);
ConfVars.GetConfDefInt (cTreeSubjectCol, qCol, 1);
ConfVars.GetConfDefInt (cTreeUnreadCol, oCol, 1);
ConfVars.GetConfDefInt (cTreeUnreadEff, oEff, 1);
qEff := 1;
END;
(* Jetzt die Objektfarben setzen *)
IF (mtAppl.Bitplanes > 1)
THEN
SetObCol (tree, MausTauschrsc.coqcol0, qCol);
VDIUtil.SetXState (tree, MausTauschrsc.coqcol1, qCol*2+1);
VDIUtil.SetXString (tree, MausTauschrsc.coqcol1, colPopup, qCol*2+1);
mtUtils.ExclFlag (tree, MausTauschrsc.coqcol0, MagicAES.HIDETREE);
SetObCol (tree, MausTauschrsc.coocol0, oCol);
VDIUtil.SetXState (tree, MausTauschrsc.coocol1, oCol*2+1);
VDIUtil.SetXString (tree, MausTauschrsc.coocol1, colPopup, oCol*2+1);
mtUtils.ExclFlag (tree, MausTauschrsc.coocol0, MagicAES.HIDETREE);
ELSE
VDIUtil.SetXState (tree, MausTauschrsc.coqcol1, qEff);
VDIUtil.SetXString (tree, MausTauschrsc.coqcol1, effPopup, qEff);
mtUtils.InclFlag (tree, MausTauschrsc.coqcol0, MagicAES.HIDETREE);
VDIUtil.SetXState (tree, MausTauschrsc.coocol1, oEff);
VDIUtil.SetXString (tree, MausTauschrsc.coocol1, effPopup, oEff);
mtUtils.InclFlag (tree, MausTauschrsc.coocol0, MagicAES.HIDETREE);
END;
IF coInfo^.isTree & (mtAppl.Bitplanes = 1)
THEN
SetObCol (tree, MausTauschrsc.coqcol0, qCol);
VDIUtil.SetXState (tree, MausTauschrsc.coqcol1, qCol*2+1);
VDIUtil.SetXString (tree, MausTauschrsc.coqcol1, colPopup, qCol*2+1);
mtUtils.ExclFlag (tree, MausTauschrsc.coqcol0, MagicAES.HIDETREE);
END;
SetObCol (tree, MausTauschrsc.cotcol0, tCol);
SetObCol (tree, MausTauschrsc.cobcol0, bCol);
VDIUtil.SetXState (tree, MausTauschrsc.cotcol1, tCol*2+1);
VDIUtil.SetXState (tree, MausTauschrsc.cobcol1, bCol*2+1);
VDIUtil.SetXString (tree, MausTauschrsc.cotcol1, colPopup, tCol*2+1);
VDIUtil.SetXString (tree, MausTauschrsc.cobcol1, colPopup, bCol*2+1);
ELSE
IF exit = MausTauschrsc.cook
THEN
tCol := VDIUtil.GetXState (tree, MausTauschrsc.cotcol1) DIV 2;
IF mtAppl.Bitplanes > 1
THEN
qCol := VDIUtil.GetXState (tree, MausTauschrsc.coqcol1) DIV 2;
IF coInfo^.isList OR coInfo^.isTree
THEN
oCol := VDIUtil.GetXState (tree, MausTauschrsc.coocol1) DIV 2;
END;
ELSE
qEff := VDIUtil.GetXState (tree, MausTauschrsc.coqcol1);
IF coInfo^.isList OR coInfo^.isTree
THEN
oEff := VDIUtil.GetXState (tree, MausTauschrsc.coocol1);
END;
END;
bCol := VDIUtil.GetXState (tree, MausTauschrsc.cobcol1) DIV 2;
IF coInfo^.isGrin
THEN
v.bool := ConfVars.SetConfigInt (cGrinTextCol, tCol);
IF mtAppl.Bitplanes > 1
THEN
v.bool := ConfVars.SetConfigInt (cGrinQuoteCol, qCol);
ELSE
v.bool := ConfVars.SetConfigInt (cGrinQuoteEff, qEff);
END;
v.bool := ConfVars.SetConfigInt (cGrinBackCol, bCol);
ELSIF coInfo^.isEdit
THEN
v.bool := ConfVars.SetConfigInt (cEditTextCol, tCol);
v.bool := ConfVars.SetConfigInt (cEditBackCol, bCol);
ELSIF coInfo^.isList
THEN
v.bool := ConfVars.SetConfigInt (cListTextCol, tCol);
v.bool := ConfVars.SetConfigInt (cListBackCol, bCol);
IF mtAppl.Bitplanes > 1
THEN
v.bool := ConfVars.SetConfigInt (cListQuoteCol, qCol);
v.bool := ConfVars.SetConfigInt (cListOwnCol, oCol);
ELSE
v.bool := ConfVars.SetConfigInt (cListQuoteEff, qEff);
v.bool := ConfVars.SetConfigInt (cListOwnEff, oEff);
END;
ELSIF coInfo^.isTree
THEN
v.bool := ConfVars.SetConfigInt (cTreeTextCol, tCol);
v.bool := ConfVars.SetConfigInt (cTreeBackCol, bCol);
v.bool := ConfVars.SetConfigInt (cTreeSubjectCol, qCol);
IF mtAppl.Bitplanes > 1
THEN
v.bool := ConfVars.SetConfigInt (cTreeUnreadCol, oCol);
ELSE
v.bool := ConfVars.SetConfigInt (cTreeUnreadEff, oEff);
END;
ELSIF coInfo^.isMess
THEN
v.bool := ConfVars.SetConfigInt (cMsgTextCol, tCol);
v.bool := ConfVars.SetConfigInt (cMsgBackCol, bCol);
IF mtAppl.Bitplanes > 1
THEN
v.bool := ConfVars.SetConfigInt (cMsgHoldCol, qCol);
ELSE
v.bool := ConfVars.SetConfigInt (cMsgHoldEff, qEff);
END;
END;
CatGlobal.SetColors();
CatGlobal.FullScreenRedraw();
END;
DISPOSE (coInfo);
END;
END colorGetSetValues;
PROCEDURE doColor(wdw : INTEGER);
VAR colorBox : mtUtils.tObjcTree;
colorInfo : colorInfoPtr;
BEGIN
IF CatEdit.IsEditTop (wdw) OR msgList.listWindowTop (wdw)
OR MsgWindow.msgWindowTop (wdw) OR treeList.treeWindowTop (wdw)
THEN
NEW (colorInfo);
IF colorInfo = NIL
THEN
MTE.noMemAlert();
RETURN
END;
colorInfo^.wdw := wdw;
colorBox := MausTauschrsc.TreeAddr^[MausTauschrsc.farben];
IF ~WinDials.OpenWinDial (colorBox, TRUE,
colorGetSetValues,
colorGetSetValues,
colorButton,
WinDials.defDraw,
"",
colorInfo)
THEN
DISPOSE (colorInfo);
MTE.noWinDialAlert();
END;
WinDials.WinDialHandleEvents ();
END;
END doColor;
TYPE varArray = ARRAY [1..11] OF ARRAY[0..255] OF CHAR;
titleArray = ARRAY [1..11] OF ARRAY [0..39] OF CHAR;
TYPE configInfo = RECORD
titles: POINTER TO titleArray;
txtArray: POINTER TO varArray;
END;
configPtr = POINTER TO configInfo;
PROCEDURE translateOut (confInfo: configPtr; VAR src, dest : ARRAY OF CHAR);
VAR path, name, suff: ARRAY [0..255] OF CHAR;
BEGIN
MagicStrings.Assign (src, dest);
MagicStrings.Assign ("", suff);
mtDir.SplitPath (confInfo^.txtArray^[5], path, name, suff);
MagicStrings.Insert ("INFILE.", suff, 0);
CatGlobal.ReplaceStr (dest, "$F", suff); (* Infilename *)
CatGlobal.ReplaceStr (dest, "$I", confInfo^.txtArray^[4]); (* Importpath *)
CatGlobal.ReplaceStr (dest, "$O", confInfo^.txtArray^[5]); (* Outfilename *)
CatGlobal.ReplaceStr (dest, "$E", confInfo^.txtArray^[6]); (* Exportpath *)
CatGlobal.ReplaceStr (dest, "$M", confInfo^.txtArray^[7]); (* Messagepath *)
mtDir.SplitPath (confInfo^.txtArray^[9], path, name, suff);
CatGlobal.ReplaceStr (dest, "$T", path); (* Terminalpath *)
END translateOut;
PROCEDURE translateIn (VAR src, dest : ARRAY OF CHAR);
VAR path, name, suff: ARRAY [0..255] OF CHAR;
BEGIN
MagicStrings.Assign (src, dest);
mtDir.SplitPath (MTPaths.archiveName, path, name, suff);
MagicStrings.Insert ("INFILE.", suff, 0);
CatGlobal.ReplaceStr (dest, suff, "$F"); (* Infilename *)
CatGlobal.ReplaceStr (dest, MTPaths.archiveName,"$O"); (* Outfilename *)
CatGlobal.ReplaceStr (dest, MTPaths.ImportPath, "$I"); (* Importpath *)
CatGlobal.ReplaceStr (dest, MTPaths.ExportPath, "$E"); (* Exportpath *)
CatGlobal.ReplaceStr (dest, MTPaths.MessagePath, "$M"); (* Messagepath *)
CatGlobal.ReplaceStr (dest, MTPaths.TerminalPath, "$T"); (* Terminalpath *)
END translateIn;
PROCEDURE getEdits(tree: ADDRESS; confInfo: configPtr);
BEGIN
mtUtils.ObjcString (tree, MausTauschrsc.psarc, confInfo^.txtArray^[2]);
mtUtils.ObjcString (tree, MausTauschrsc.psdearc, confInfo^.txtArray^[3]);
mtUtils.ObjcString (tree, MausTauschrsc.pscomm, confInfo^.txtArray^[10]);
END getEdits;
PROCEDURE configButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR idx : INTEGER;
but : INTEGER;
confInfo: configPtr;
res,
pathOnly: BOOLEAN;
str,
path : ARRAY [0..255] OF CHAR;
suff,
name : ARRAY [0..20] OF CHAR;
r : mtUtils.tRect;
tf : mtTextfiles.TEXTFILE;
BEGIN
confInfo := private;
but := INTEGER(BITSET(button) - {15});
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
idx := but - MausTauschrsc.pbpack+1;
CASE but OF
MausTauschrsc.pbpack..MausTauschrsc.pbterm:
(* Pfad holen *)
(* Nur bei pboutfil nur Dateinamen ohne Pfad nehmen,
* bei pbpack oder pbterm auch noch Dateinamen an Pfad
* anhngen
*)
IF but = MausTauschrsc.pboutfil
THEN
MagicStrings.Assign (confInfo^.txtArray^[4], path);
MagicStrings.Assign (confInfo^.txtArray^[idx], name);
ELSE
mtDir.SplitPath (confInfo^.txtArray^[idx], path, name, suff);
END;
pathOnly := (but # MausTauschrsc.pbterm)
& (but # MausTauschrsc.pboutfil);
res := CatGlobal.FselGet (path, name, '*.*', confInfo^.titles^[idx], pathOnly);
IF res
THEN
IF but = MausTauschrsc.pboutfil
THEN
MagicStrings.Assign (name, confInfo^.txtArray^[idx]);
ELSE
MagicStrings.Assign (path, confInfo^.txtArray^[idx]);
END;
IF (but = MausTauschrsc.pbpack)
OR (but = MausTauschrsc.pbterm)
THEN
IF name[0] # ''
THEN
MagicStrings.Append (name, confInfo^.txtArray^[idx]);
ELSE
MagicStrings.Assign ('', confInfo^.txtArray^[idx]);
END;
END;
mtUtils.SetObjcString (tree, but-MausTauschrsc.pbpack+MausTauschrsc.pspack, confInfo^.txtArray^[idx]);
mtUtils.CalcArea (tree, but-MausTauschrsc.pbpack+MausTauschrsc.pspack, r);
WinDials.WinDialDraw (tree, 0, 2, r, TRUE);
END; |
MausTauschrsc.pathhelp:
CatHelp.DoHelp (CatHelp.paths); |
MausTauschrsc.pathsave:
(* CAT.INF schreiben, Fileselektor, um Name zu erfragen *)
MagicStrings.Assign (CatGlobal.infName, name);
mtDir.SplitPath (CatGlobal.infName, path, name, suff);
MagicStrings.Assign (CatGlobal.infPath, path);
IF suff[0] # ''
THEN
MagicStrings.Insert('*.', suff, 0);
ELSE
suff := '*.inf'
END;
res := CatGlobal.FselGet (path, name, suff, 'CAT.INF sichern', FALSE);
IF res THEN
MagicStrings.Append (name, path);
IF mtTextfiles.OpenTextfile (path, mtTextfiles.WRITE, 512, tf)
THEN
getEdits(tree, confInfo); (* editable Strings holen *)
IF LENGTH(confInfo^.txtArray^[1]) > 0
THEN
mtDir.SplitPath(confInfo^.txtArray^[1], path, name, suff);
mtTextfiles.WriteConst (tf, path); mtTextfiles.WriteLn(tf); (* Arc-Path *)
mtTextfiles.WriteConst (tf, name); mtTextfiles.WriteLn(tf); (* Arc-Name *)
ELSE
mtTextfiles.WriteLn (tf);
mtTextfiles.WriteLn (tf);
END;
translateOut (confInfo, confInfo^.txtArray^[2], str);
mtTextfiles.WriteConst (tf, str); mtTextfiles.WriteLn(tf); (* arc-Command *)
translateOut (confInfo, confInfo^.txtArray^[3], str);
mtTextfiles.WriteConst (tf, str); mtTextfiles.WriteLn(tf); (* dearc-Command *)
mtTextfiles.WriteConst (tf, confInfo^.txtArray^[5]); mtTextfiles.WriteLn(tf); (* Outfile name *)
mtTextfiles.WriteLn(tf); (* EditorPath: not supported from dialog *)
mtTextfiles.WriteLn(tf); (* EditorName: not supported from dialog *)
mtTextfiles.WriteConst (tf, confInfo^.txtArray^[7]); mtTextfiles.WriteLn(tf); (* Messagepath *)
mtTextfiles.WriteConst (tf, confInfo^.txtArray^[4]); mtTextfiles.WriteLn(tf); (* Importpath *)
mtTextfiles.WriteConst (tf, confInfo^.txtArray^[6]); mtTextfiles.WriteLn(tf); (* Exportpath *)
mtTextfiles.WriteConst (tf, confInfo^.txtArray^[8]); mtTextfiles.WriteLn(tf); (* Databasepath *)
mtDir.SplitPath(confInfo^.txtArray^[9], path, name, suff);
mtTextfiles.WriteConst (tf, path); mtTextfiles.WriteLn(tf); (* TerminalPath *)
mtTextfiles.WriteConst (tf, name); mtTextfiles.WriteLn(tf); (* TerminalName *)
translateOut (confInfo, confInfo^.txtArray^[10], str);
mtTextfiles.WriteConst (tf, str); mtTextfiles.WriteLn(tf); (* Terminalcommand *)
mtTextfiles.CloseTextfile (tf);
Protokoll.SendPathUpdate (path);
ELSE
MTE.InfoAlert (MTE.noFile1, name, MTE.noFile3);
END;
END;
|
MausTauschrsc.pathok,
MausTauschrsc.pathquit: RETURN TRUE; |
ELSE
END;
WinDials.WinDialDraw (tree, but, 1, v.r, FALSE);
RETURN FALSE;
END configButton;
PROCEDURE configGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR confInfo : configPtr;
i,
but : INTEGER;
suff : ARRAY [0..20] OF CHAR;
BEGIN
confInfo := private;
but := INTEGER(BITSET(exit) - {15});
IF set
THEN
(* Strings setzen *)
MagicStrings.Assign (MTPaths.ARCPath, confInfo^.txtArray^[1]);
MagicStrings.Append (MTPaths.ARCName, confInfo^.txtArray^[1]);
translateIn (MTPaths.enarcStr, confInfo^.txtArray^[2]);
translateIn (MTPaths.dearcStr, confInfo^.txtArray^[3]);
MagicStrings.Assign (MTPaths.ImportPath, confInfo^.txtArray^[4]);
MagicStrings.Assign (MTPaths.archiveName, confInfo^.txtArray^[5]);
MagicStrings.Assign (MTPaths.ExportPath, confInfo^.txtArray^[6]);
MagicStrings.Assign (MTPaths.MessagePath, confInfo^.txtArray^[7]);
MagicStrings.Assign (MTPaths.DataPath, confInfo^.txtArray^[8]);
MagicStrings.Assign (MTPaths.TerminalPath, confInfo^.txtArray^[9]);
MagicStrings.Append (MTPaths.TerminalName, confInfo^.txtArray^[9]);
translateIn (MTPaths.TerminalCmd, confInfo^.txtArray^[10]);
(* Titel fr Fileselektor setzen *)
MagicStrings.Assign ("Packer auswhlen", confInfo^.titles^[1]);
MagicStrings.Assign ("Importpfad auswhlen", confInfo^.titles^[4]);
MagicStrings.Assign ("Outfilenamen festlegen", confInfo^.titles^[5]);
MagicStrings.Assign ("Exportpfad auswhlen", confInfo^.titles^[6]);
MagicStrings.Assign ("Nachrichtenpfad auswhlen", confInfo^.titles^[7]);
MagicStrings.Assign ("Databasepfad auswhlen", confInfo^.titles^[8]);
MagicStrings.Assign ("Terminalprogramm auswhlen", confInfo^.titles^[9]);
FOR i := MausTauschrsc.pspack TO MausTauschrsc.pscomm DO
mtUtils.SetObjcString (tree, i, confInfo^.txtArray^[i-MausTauschrsc.pspack+1]);
END;
ELSE
IF but = MausTauschrsc.pathok
THEN
getEdits (tree, confInfo); (* editables holen *)
(* Strings bernehmen *)
IF LENGTH (confInfo^.txtArray^[1]) > 0 THEN
mtDir.SplitPath(confInfo^.txtArray^[1], MTPaths.ARCPath, MTPaths.ARCName, suff);
ELSE
MagicStrings.Assign ('', MTPaths.ARCName);
MagicStrings.Assign ('', MTPaths.ARCPath);
END;
translateOut (confInfo, confInfo^.txtArray^[2], MTPaths.enarcStr);
translateOut (confInfo, confInfo^.txtArray^[3], MTPaths.dearcStr);
MagicStrings.Assign (confInfo^.txtArray^[4], MTPaths.ImportPath);
MagicStrings.Assign (confInfo^.txtArray^[5], MTPaths.archiveName);
MagicStrings.Assign (confInfo^.txtArray^[6], MTPaths.ExportPath);
MagicStrings.Assign (confInfo^.txtArray^[7], MTPaths.MessagePath);
MagicStrings.Assign (confInfo^.txtArray^[8], MTPaths.DataPath);
mtDir.SplitPath(confInfo^.txtArray^[9], MTPaths.TerminalPath, MTPaths.TerminalName, suff);
translateOut (confInfo, confInfo^.txtArray^[10], MTPaths.TerminalCmd);
END;
DEALLOCATE (confInfo^.titles, 0);
DEALLOCATE (confInfo^.txtArray, 0);
DISPOSE (confInfo);
END;
END configGetSetValues;
PROCEDURE doConfig();
VAR tree : mtUtils.tObjcTree;
confInfo : configPtr;
BEGIN
tree := MausTauschrsc.TreeAddr^[MausTauschrsc.path_cnf];
NEW (confInfo);
IF confInfo = NIL
THEN
MTE.noMemAlert();
RETURN
END;
ALLOCATE (confInfo^.txtArray, TSIZE (varArray));
IF confInfo^.txtArray = NIL
THEN
MTE.noMemAlert();
DISPOSE (confInfo);
RETURN
END;
ALLOCATE (confInfo^.titles, TSIZE (titleArray));
IF confInfo^.titles = NIL
THEN
MTE.noMemAlert();
DEALLOCATE (confInfo^.txtArray, 0);
DISPOSE (confInfo);
RETURN
END;
IF ~WinDials.OpenWinDial (tree, FALSE,
configGetSetValues,
configGetSetValues,
configButton,
WinDials.defDraw,
"",
confInfo)
THEN
DEALLOCATE (confInfo^.txtArray, 0);
DEALLOCATE (confInfo^.titles, 0);
DISPOSE (confInfo);
MTE.noWinDialAlert();
END;
END doConfig;
TYPE formatArray = ARRAY [1..4] OF CatTypes.String255;
formatInfo = RECORD
txtArray : POINTER TO formatArray;
oldEntry : INTEGER;
END;
formatInfoPtr = POINTER TO formatInfo;
PROCEDURE formatButton (tree: ADDRESS; private: ADDRESS; button: INTEGER;
mx, my : INTEGER; kstate: BITSET; clicks: INTEGER): BOOLEAN;
VAR but : INTEGER;
formInfo : formatInfoPtr;
ok : BOOLEAN;
BEGIN
formInfo := private;
but := INTEGER(BITSET(button) - {15});
CASE but OF
MausTauschrsc.foinfo1..MausTauschrsc.foglobal :
mtUtils.ObjcString (tree, MausTauschrsc.fotxt1, formInfo^.txtArray^[formInfo^.oldEntry-MausTauschrsc.foinfo1+1]);
mtUtils.SetObjcString (tree, MausTauschrsc.fotxt1, formInfo^.txtArray^[but-MausTauschrsc.foinfo1+1]);
formInfo^.oldEntry := but;
WinDials.WinDialDraw (tree, MausTauschrsc.fobox, 2, v.r, FALSE); |
MausTauschrsc.fook:
mtUtils.ObjcString (tree, MausTauschrsc.fotxt1, formInfo^.txtArray^[formInfo^.oldEntry-MausTauschrsc.foinfo1+1]);
ok := CheckInfoline (formInfo^.txtArray^[1]) & CheckInfoline (formInfo^.txtArray^[2]);
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
IF ~ok THEN
MTE.info ('[3][CAT:|Eine der Infozeilen|entspricht nicht der|korrekten Syntax!][[Nochmal]');
WinDials.WinDialDraw (tree, but, 1, v.r, FALSE);
ELSE
ok := msgList.CheckListLine (formInfo^.txtArray^[3]) &
msgList.CheckListLine (formInfo^.txtArray^[4]);
IF ~ok THEN
MTE.info ('[3][CAT:|Eine der Stichwortzeilen|entspricht nicht der|korrekten Syntax!][[Nochmal]');
WinDials.WinDialDraw (tree, but, 1, v.r, FALSE);
ELSE
RETURN TRUE;
END;
END; |
MausTauschrsc.foquit:
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
RETURN TRUE; |
MausTauschrsc.fohelp:
CatHelp.DoHelp (CatHelp.formats);
mtUtils.ExclState (tree, but, MagicAES.SELECTED);
WinDials.WinDialDraw (tree, but, 1, v.r, FALSE); |
ELSE
END;
RETURN FALSE;
END formatButton;
PROCEDURE formatGetSetValues (tree: ADDRESS; private: ADDRESS;
set: BOOLEAN; exit: INTEGER);
VAR i : INTEGER;
found : BOOLEAN;
but : INTEGER;
formInfo : formatInfoPtr;
BEGIN
formInfo := private;
but := INTEGER(BITSET(exit) - {15});
IF set
THEN
(* Textarray fllen *)
MagicStrings.Assign(UserInformation.UserBLK.infoline1, formInfo^.txtArray^[1]);
MagicStrings.Assign(UserInformation.UserBLK.infoline2, formInfo^.txtArray^[2]);
ConfVars.GetConfDefStr (cPrivateLine, formInfo^.txtArray^[3], CatTypes.cPrivateDefault);
ConfVars.GetConfDefStr (cGlobalLine, formInfo^.txtArray^[4], CatTypes.cGlobalDefault);
(* Selektierten Eintrag feststellen *)
i := MausTauschrsc.foinfo1;
found := FALSE;
WHILE ~found & (i <= MausTauschrsc.foglobal) DO
found := mtUtils.InState (tree, i, MagicAES.SELECTED);
IF ~found THEN INC (i); END;
END;
IF ~found THEN
i := MausTauschrsc.foinfo1;
mtUtils.InclState (tree, i, MagicAES.SELECTED);
END;
formInfo^.oldEntry := i;
mtUtils.SetObjcString (tree, MausTauschrsc.fotxt1, formInfo^.txtArray^[i-MausTauschrsc.foinfo1+1]);
ELSE
IF but = MausTauschrsc.fook
THEN
MagicStrings.Assign(formInfo^.txtArray^[1], UserInformation.UserBLK.infoline1);
MagicStrings.Assign(formInfo^.txtArray^[2], UserInformation.UserBLK.infoline2);
v.bool := ConfVars.SetConfigString (cInfoline1, formInfo^.txtArray^[1]);
v.bool := ConfVars.SetConfigString (cInfoline2, formInfo^.txtArray^[2]);
v.bool := ConfVars.SetConfigString (cPrivateLine, formInfo^.txtArray^[3]);
v.bool := ConfVars.SetConfigString (cGlobalLine, formInfo^.txtArray^[4]);
msgList.SetListLine (formInfo^.txtArray^[3], TRUE);
msgList.SetListLine (formInfo^.txtArray^[4], FALSE);
END;
DEALLOCATE (formInfo^.txtArray, 0);
DISPOSE (formInfo);
END;
END formatGetSetValues;
PROCEDURE doFormat ();
VAR tree : mtUtils.tObjcTree;
formInfo : formatInfoPtr;
BEGIN
tree := MausTauschrsc.TreeAddr^[MausTauschrsc.form_cnf];
NEW (formInfo);
IF formInfo = NIL
THEN
MTE.noMemAlert();
RETURN
END;
ALLOCATE (formInfo^.txtArray, TSIZE (formatArray));
IF formInfo^.txtArray = NIL
THEN
MTE.noMemAlert();
DISPOSE (formInfo);
RETURN
END;
IF ~WinDials.OpenWinDial (tree, FALSE,
formatGetSetValues,
formatGetSetValues,
formatButton,
WinDials.defDraw,
"",
formInfo)
THEN
DISPOSE (formInfo);
MTE.noWinDialAlert();
END;
END doFormat;
END CatOpts.